<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <title><?php echo $store_name;?></title>
        <meta charset="UTF-8">
        <meta name="description" content="<?php echo $action['action_name'];?>">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
        <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <script type='text/javascript' src='/public/js/jquery-3.1.1.min.js'></script>
        <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "//hm.baidu.com/hm.js?8d43b5b5d798921b66d689f7a792e6e2";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <script type="text/javascript">
            document.domain = '<?php echo _DOMAIN_ALL_;?>';
        </script>
        <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    </head>
    <body <?php  if(strstr($_SERVER['REQUEST_URI'],'user/passport/') ){ echo 'class="_login_backimg"';} ?> >
 
<link href="/public/css/main.css" rel="stylesheet">
<div class="container" style='font-size:10px;' >
    <div class='_main'>
        <div style='height:1.5rem'></div>
        <div class="<?php if(strstr($_SERVER['REQUEST_URI'],'user/passport/')){ echo '_banner';}else{ echo 'banner';}?>">
            <?php if(!strstr($_SERVER['REQUEST_URI'],'user/passport/')){?>
            <div class='_logo' style='height: 25rem'>
                <a href='#'><img src="/public/images/kaka.png" class='logo_img'  alt='banner' style="width:30%"/></a>
            </div>
            <?php } ?>
            <img src="<?php echo strlen($logo)<1?'/public/images/KAKA-LOGO.png':$logo;?>" class="<?php if(strstr($_SERVER['REQUEST_URI'],'user/passport/')){ echo '_banner_img'; }else{ echo 'banner_img'; }?>"  id='change'  alt='banner' />
            <?php if($barber['id']>0){?>
            <div style='text-align:center;width:13rem;height: 13rem;right:2%;margin-top:-9rem;position: absolute;z-index:100;background-color:white;border-radius:50%;'>
                <div style='height:12rem;width:12rem;margin:0.5rem auto'>
                <img src="<?php if(strlen($barber['photo'])>0){echo $barber['photo'];}else{echo '/public/images/tou.png';}?>" id='change'  style="width:100%;height: 100%;border-radius:50%;overflow:hidden;">
                </div>
                <div style='height:1rem'></div>
                <font style="font-size:1.5rem;color:black"><b><?php echo $barber['level'].' : '.$barber['name'];?></b></font>
            </div>
            <?php }?>
        </div>
 
<div class="login_div">
    <form  id='login_form'>

        <div class='form-group'>
            <input type="text" class="form-control" id='store_name' name='store_name' placeholder="请输入门店/公司名称" value="" style='border-color:#8A8C76;background:rgba(0,0,0,0);color:white;' />
            <span id='check_store' style='color:red'> </span>
        </div>
        <div class='form-group'>
            <input type="text" class="form-control" id='name' name='name' placeholder="请输入姓名" value="" style='border-color:#8A8C76;background:rgba(0,0,0,0);color:white;' />
            <span id='check_name' style='color:red'> </span>
        </div>
        <div class='form-group'>
            <input type="text" class="form-control" name="mobile" id='mobile' placeholder="请输入联系方式" value="" style='border-color:#8A8C76;background:rgba(0,0,0,0);color:white;' />
            <span id='check_mobile' style='color:red'> </span>
            
        </div>
        <div class="form-group login_sub" >
            <input type="button" class="btn btn-info form-control" id='_submit' name="提交" value="提&nbsp;&nbsp;&nbsp;交" style='border-color:#8A8C76;background:rgba(0,0,0,0);color:white;'>
        </div>
    </form>
    <div class="form-group login_sub" style="color:#999; margin:10rem  auto;" >唯美会互动科技（北京）有限公司</div>
</div>
<script type='text/javascript'>
$(document).ready(function(){
    $('#_submit').click(function(){
        var mobile = $("#mobile").val();
        var name=$('#name').val();
        var store_name=$('#store_name').val();
        var reg=/^(((1[1-9]{1}[0-9]{1})|(15[0-9]{1}))+\d{8})$/;
        if(store_name==''){
            $('#check_store').html('请输入门店/公司名称');
            return;
        }
        if(name==''){
            $('#check_name').html('请输入姓名');
            return;
        }
        if(!reg.test(mobile)){
            $('#check_mobile').html('请正确输入联系方式');
            return;
        }
        $.ajax({
            url: "/user/passport/business_submit?name=" + name + "&mobile=" + mobile + "&store_name=" + store_name + "&store_id=" + <?php echo (int)$_GET['store_id']; ?>, 
            async: true, 
            success: function (msg){
                if(msg==true){
                    alert('您的信息我们已经收到，我们会尽快和您联系！');
                    history.go(-1);
                }else{
                    alert('信息有误！请您正确填写信息。');
                }
            }
        });
    });
});   
</script>